package model.v2.smi;

import annotation.ShowInfo;
import com.google.gson.annotations.Expose;
import model.MibNode;
import util.mib.MibFormatUtils;

import java.util.ArrayList;
import java.util.List;

public class MibModuleIdentityNodeV2 extends MibNode {
    public static class Revision{
        @Expose
        @ShowInfo(name = "版本")
        public String revision;
        @Expose
        @ShowInfo(name = "版本描述")
        public String description;

        public Revision(String revision, String description) {
            this.revision = revision;
            this.description = description;
        }

        @Override
        public String toString() {
            StringBuilder builder = new StringBuilder();
            MibFormatUtils.appendInfoField(builder, this);
            return builder.toString().replaceAll("\\t{2,}", "\t");
        }
    }

    @Expose
    @ShowInfo(name = "最新版本")
    public String lastUpdated;
    @Expose
    @ShowInfo(name = "组织机构")
    public String organization;
    @Expose
    @ShowInfo(name = "联系方式 ")
    public String contactInfo;
    @Expose
    @ShowInfo(name = "历史版本")
    public List<Revision> revisionPart = new ArrayList<>();
}
